package com.huanong.controller.impl;

import com.huanong.common.grace.result.GraceJSONResult;
import com.huanong.controller.TestDataBaseControllerApi;
import com.huanong.pojo.Admin;
import com.huanong.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestDataBaseController implements TestDataBaseControllerApi {

    @Autowired
    private TestService testService;

    @Override
    public GraceJSONResult textDataBase() {
        List<Admin> allAdmin = testService.queryAll();
        return GraceJSONResult.ok(allAdmin);
    }
}
